/*
 * Copyright 2015-2016 Imply Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../imports';

.simple-table {
  width: 100%;
  height: 100%;

  .scroller {
    height: 100%;
    cursor: auto;


    .column-headers {
      font-size: 12px;
      text-transform: uppercase;
      border-bottom: 1px solid $border-super-light;
      height: 100%;

      .header {
      }

      background-color: $white;

      > * {
        display: inline-block;
      }

      .sort-arrow {
        width: 8px;
        margin-left: 10px;

        &.ascending {
          transform: rotate(180deg);
        }
      }
    }

    .top-right-corner {
      border-bottom: 1px solid $border-super-light;
      background-color: $white;
    }

    .row {
      position: absolute;
      width: 100%;
      border-bottom: 1px solid $border-super-light;
      white-space: nowrap;

      > * {
        display: inline-block;
      }

      &.hover {
        background: $hover;
      }

      .cell {
        @include ellipsis;
        position: absolute;
        padding: 14px 10px 5px 0;

        &.has-icon {
          padding-left: 34px;
        }

        .svg-icon {
          position: absolute;
          top: 10px;
          left: 6px;
          width: 19px;
          height: 19px;

          path {
            fill: $brand;
          }
        }
      }

      &.action {
        text-align: center;
        padding-top: 10px;

        .icon {
          width: 19px;
          height: 19px;

          .svg-icon {
            width: 100%;
            height: 100%;

            path {
              fill: $brand;
            }
          }

          &.hover {
            &::after {
              content: '';
              position: absolute;
              top: -6px;
              left: 0;
              width: 30px;
              height: 30px;
              border-radius: 30px;
              background: rgba($brand, 0.18);
            }
          }
        }
      }
    }
  }

  &.clickable {
    .scroller {
      cursor: pointer;
    }
  }
}
